
<#include "*/general/header.ftl">
<script type="text/javascript" src="/Carrello/js/jquery-1.7.js"></script>

<h3>Update Product</h3>
<form id="updateproductform" name="input" action="updateproduct.action" method="post">
<input type="hidden" name="productid" value="${productid}"/>
<input type="hidden" id="cancelled" name="cancelled" value="0"/>
<table id="productInformation" class="supa">

<#list attributes as attribute>
    <tr>
        <td >${attribute[0]}</td>

        <#if "${attribute[2]}" == "0" && "${attribute[3]}" == "String">
            <td ><input name="values" type="text" value="${attribute[1]}"/></td>
        <#elseif "${attribute[2]}" == "1" && "${attribute[3]}" == "String">
            <td><input class="reqstring" name="values" type="text" value="${attribute[1]}"/> </td>
        <#elseif "${attribute[2]}" == "1" && "${attribute[3]}" == "Double">
            <td><input class="reqdouble" name="values" type="text" value="${attribute[1]}"/> </td>
        <#elseif "${attribute[2]}" == "1" && "${attribute[3]}" == "Integer">
            <td><input class="reqinteger" name="values" type="text" value="${attribute[1]}"/> </td>
        <#elseif "${attribute[2]}" == "0" && "${attribute[3]}" == "Integer">
            <td><input class="optinteger" name="values" type="text" value="${attribute[1]}"/> </td>
        <#elseif "${attribute[2]}" == "0" && "${attribute[3]}" == "Double">
            <td><input class="optdouble" name="values" type="text" value="${attribute[1]}"/> </td>
        </#if>

        

        <#if "${attribute[2]}" == "1">
            <td>*</td>
        <#else>
            <td/>
        </#if>
    </tr>
</#list>
    <tr>
        <td></td>
        <td><input type="button" value="Update Product"/></td>
        <td><input type="button" value="Cancel"/></td>
    </tr>
</table>
</form>
<script type="text/javascript" src="/Carrello/js/updateproduct.js"></script>
<#include "*/general/footer.ftl">